home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 April / Gamestar_61_2004-04_dvdb.iso / DVDStar / Editace / hltp.exe / {app} / Source Code / Zoners Half-Life Tools / common / messages.cpp < prev    next >
C/C++ Source or Header  |  2002-04-21  |  7KB  |  114 lines

  1. #include "messages.h"
  2.  
  3. // AJM: because these are repeated, they use up redundant memory. 
  4. //  consequently ive made them into const strings which each occurance can point to.
  5.  
  6. // Common descriptions
  7. //#define internallimit   "The compiler tool hit an internal limit"
  8. //#define internalerror   "The compiler tool had an internal error"
  9. //#define maperror        "The map has a problem which must be fixed"
  10. const char* const internallimit = "The compiler tool hit an internal limit";
  11. const char* const internalerror = "The compiler tool had an internal error";
  12. const char* const maperror      = "The map has a problem which must be fixed";
  13.  
  14. // Common explanations
  15. #define contact contactmerl //"contact zoner@gearboxsoftware.com immidiately"
  16. //#define selfexplanitory "self explanitory"
  17. //#define reference "Check the file ZHLTProblems.html for a detailed explanation of this problem"
  18. //#define simplify "The map is too complex for the game engine/compile tools to handle.  Simplify"
  19. //#define contactmerl "contact merlinis@bigpond.net.au concerning this issue."
  20. const char* const selfexplanitory = "self explanitory";
  21. const char* const reference       = "Check the file ZHLTProblems.html for a detailed explanation of this problem";
  22. const char* const simplify        = "The map is too complex for the game engine/compile tools to handle.  Simplify";
  23. const char* const contactmerl     = "contact merlinis@bigpond.net.au concerning this issue.";
  24.  
  25. static const MessageTable_t assumes[assume_last] = {
  26.     {"invalid assume message", "This is a message should never be printed.", contact},
  27.  
  28.     // generic
  29.     {"Memory allocation failure", "The program failled to allocate a block of memory.",
  30.      "Likely causes are (in order of likeliness) : the partition holding the swapfile is full; swapfile size is smaller than required; memory fragmentation; heap corruption"},
  31.     {"NULL Pointer", internalerror, contact},
  32.     {"Bad Thread Workcount", internalerror, contact},
  33.  
  34.     // qcsg
  35.     {"Missing '[' in texturedef (U)", maperror, reference},
  36.     {"plane with no normal", maperror, reference},
  37.     {"brush with coplanar faces", maperror, reference},
  38.     {"brush outside world", maperror, reference},
  39.     {"mixed face contents", maperror, reference},
  40.     {"Brush type not allowed in world", maperror, reference},
  41.     {"Brush type not allowed in entity", maperror, reference},
  42.     {"No visibile brushes", "All brushes are CLIP or ORIGIN (at least one must be normal/visible)", selfexplanitory},
  43.     {"Entity with ONLY an ORIGIN brush", "All entities need at least one visible brush to function properly.  CLIP, HINT, ORIGIN, do not count as visible brushes.", selfexplanitory},
  44.     {"Could not find WAD file", "The compile tools could not locate a wad file that the map was referencing.", "Make sure the wad's listed in the level editor actually all exist"},
  45.     {"Exceeded MAX_TRIANGLES", internallimit, contact},
  46.     {"Exceeded MAX_SWITCHED_LIGHTS", "The maximum number of switchable light entities has been reached", selfexplanitory},
  47.     {"Exceeded MAX_TEXFILES", internallimit, contact},
  48.  
  49.     // qbsp
  50.     {"LEAK in the map", maperror, reference},
  51.     {"Exceeded MAX_LEAF_FACES", "This error is almost always caused by an invalid brush, by having huge rooms, or scaling a texture down to extremely small values (between -1 and 1)",
  52.      "Find the invalid brush.  Any imported prefabs, carved brushes, or vertex manipulated brushes should be suspect"},
  53.     {"Exceeded MAX_WEDGES", internallimit, contact},
  54.     {"Exceeded MAX_WVERTS", internallimit, contact},
  55.     {"Exceeded MAX_SUPERFACEEDGES", internallimit, contact},
  56.     {"Empty Solid Entity", "A solid entity in the map (func_wall for example) has no brushes.",  "If using Worldcraft, do a check for problems and fix any occurences of 'Empty solid'"},
  57.  
  58.     // vis
  59.     {"Leaf portal saw into leaf", maperror, reference},
  60.     {"Exceeded MAX_PORTALS_ON_LEAF", maperror, reference},
  61.     {"Invalid client/server state", internalerror, contact},
  62.  
  63.     // qrad
  64.     {"Exceeded MAX_TEXLIGHTS", "The maximum number of texture lights in use by a single map has been reached",
  65.      "Use fewer texture lights."},
  66.     {"Exceeded MAX_PATCHES", maperror, reference},
  67.     {"Transfer < 0", internalerror, contact},
  68.     {"Bad Surface Extents", maperror, reference},
  69.     {"Malformed face normal", "The texture alignment of a visible face is unusable", "If using Worldcraft, do a check for problems and fix any occurences of 'Texture axis perpindicular to face'"},
  70.     {"No Lights!", "lighting of map halted (I assume you do not want a pitch black map!)", "Put some lights in the map."},
  71.     {"Bad Light Type", internalerror, contact},
  72.     {"Exceeded MAX_SINGLEMAP", internallimit, contact},
  73.  
  74.     // common
  75.     {"Unable to create thread", internalerror, contact},
  76.     {"Exceeded MAX_MAP_PLANES", "The maximum number of plane definitions has been reached",
  77.      "The map has grown too complex"},
  78.     {"Exceeded MAX_MAP_TEXTURES", "The maximum number of textures for a map has been reached", selfexplanitory},
  79.  
  80.     {"Exceeded MAX_MAP_MIPTEX", "Texture memory usage on the map has exceeded the limit",
  81.      "Merge similar textures, remove unused textures from the map"},
  82.     {"Exceeded MAX_MAP_TEXINFO", internallimit, contact},
  83.     {"Exceeded MAX_MAP_SIDES", internallimit, contact},
  84.     {"Exceeded MAX_MAP_BRUSHES", "The maximum number of brushes for a map has been reached", selfexplanitory},
  85.     {"Exceeded MAX_MAP_ENTITIES", "The maximum number of entities for the compile tools has been reached", selfexplanitory},
  86.     {"Exceeded MAX_ENGINE_ENTITIES", "The maximum number of entities for the half-life engine has been reached", selfexplanitory},
  87.  
  88.     {"Exceeded MAX_MAP_MODELS", "The maximum number of brush based entities has been reached",
  89.      "Remove unnecessary brush entities, consolidate similar entities into a single entity"},
  90.     {"Exceeded MAX_MAP_VERTS", internallimit, contact},
  91.     {"Exceeded MAX_MAP_EDGES", internallimit, contact},
  92.  
  93.     {"Exceeded MAX_MAP_CLIPNODES", maperror, reference},
  94.     {"Exceeded MAX_MAP_MARKSURFACES", internallimit, contact},
  95.     {"Exceeded MAX_MAP_FACES", "The maximum number of faces for a map has been reached", "This error is typically caused by having a large face with a small texture scale on it, or overly complex maps."},
  96.     {"Exceeded MAX_MAP_SURFEDGES", internallimit, contact},
  97.     {"Exceeded MAX_MAP_NODES", "The maximum number of nodes for a map has been reached", simplify},
  98.     {"CompressVis Overflow", internalerror, contact},
  99.     {"DecompressVis Overflow", internalerror, contact},
  100.     {"Execution Cancelled", "Tool execution was cancelled either by the user or due to a fatal compile setting", selfexplanitory},
  101.     {"Internal Error", internalerror, contact},
  102. }; 
  103.  
  104. const MessageTable_t* GetAssume(assume_msgs id)
  105. {
  106.     if (!(id > assume_first) && (id < assume_last))
  107.     {
  108.         id = assume_first;
  109.     }
  110.     return &assumes[id];
  111. }
  112.  
  113.  
  114.